package com.u2b.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.u2b.db.datasource.DbcpHandler;
import com.u2b.global.utils.Constants;

public class InitAction extends HttpServlet
{
    @Override
    public void init() throws ServletException
    {
        String applicationPath = getServletContext().getRealPath("/WEB-INF/classes");
        Constants.init(applicationPath);
        try {
			System.out.println(DbcpHandler.getInstance().getWriteConnection());
		} catch (Exception e) {
			
			e.printStackTrace();
		}
    }

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
    {
        doPost(req, resp);

    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
    {

    }
}
